class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.u: B = None
        self.p: D = None
        self.y: E = None
        self.t: B = None
        self.r: D = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: F = None
        self.q: D = None
        self.v: D = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: G = None
        self.r: A = None
        self.t: C = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: H = None
        self.v: G = None
        self.o: F = None
        self.x: A = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.x: E = None
        self.v: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: B = None
        self.x: F = None
        self.s: B = None
        self.t: B = None
        self.v: E = None
        self.txt = txt

h = A("h")
k = B("k")
j = C("j")
d = D("d")
n = E("n")
m = F("m")
g = G("g")
l = H("l")

h.z = k
h.o = k
h.u = k
h.t = k
h.p = d
h.r = d
h.y = n
h.x = m
k.t = n
k.u = m
k.q = d
k.v = d
k.x = l
k.p = h
j.r = k
d.s = g
d.x = g
d.r = h
d.y = h
d.v = h
d.t = j
n.z = d
n.q = d
n.t = l
n.v = g
n.o = m
n.w = m
n.x = h
m.u = d
m.z = d
m.x = n
m.v = g
m.p = j
g.x = k
g.w = l
g.p = d
l.w = g
l.y = k
l.s = k
l.t = k
l.x = m
l.v = n
assert j.r.t.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.u: B = None
        self.p: D = None
        self.y: E = None
        self.t: B = None
        self.r: D = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: F = None
        self.q: D = None
        self.v: D = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: G = None
        self.r: A = None
        self.t: C = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: H = None
        self.v: G = None
        self.o: F = None
        self.x: A = None
        self.q: D = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.x: E = None
        self.v: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: B = None
        self.x: F = None
        self.s: B = None
        self.t: B = None
        self.v: E = None
        self.txt = txt

h = A("h")
k = B("k")
j = C("j")
d = D("d")
n = E("n")
m = F("m")
g = G("g")
l = H("l")

h.z = k
h.o = k
h.u = k
h.t = k
h.p = d
h.r = d
h.y = n
h.x = m
k.t = n
k.u = m
k.q = d
k.v = d
k.x = l
k.p = h
j.r = k
d.s = g
d.x = g
d.r = h
d.y = h
d.v = h
d.t = j
n.z = d
n.q = d
n.t = l
n.v = g
n.o = m
n.w = m
n.x = h
m.u = d
m.z = d
m.x = n
m.v = g
m.p = j
g.x = k
g.w = l
g.p = d
l.w = g
l.y = k
l.s = k
l.t = k
l.x = m
l.v = n
assert j.r.t.w.u.txt == "d"