class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: I = None
        self.r: H = None
        self.v: H = None
        self.s: I = None
        self.y: A = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: C = None
        self.s: D = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.t: B = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: A = None
        self.x: D = None
        self.u: D = None
        self.y: D = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: G = None
        self.u: C = None
        self.y: A = None
        self.w: D = None
        self.q: G = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.t: G = None
        self.v: C = None
        self.txt = txt

j = A("j")
e = B("e")
f = C("f")
h = D("h")
k = E("k")
d = F("d")
b = G("b")
l = H("l")
g = I("g")
i = A("i")

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: C = None
        self.s: D = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.t: B = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: A = None
        self.x: D = None
        self.u: D = None
        self.y: D = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: G = None
        self.u: C = None
        self.y: A = None
        self.w: D = None
        self.q: G = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.t: G = None
        self.v: C = None
        self.txt = txt

j = A("j")
e = B("e")
f = C("f")
h = D("h")
k = E("k")
d = F("d")
b = G("b")
l = H("l")
g = I("g")
i = A("i")

j.q = h
j.p = g
j.s = g
j.r = l
j.v = l
j.y = i
j.o = k
j.t = d
e.v = g
e.q = f
e.s = h
e.p = l
e.u = i
f.x = k
h.x = k
k.w = e
k.t = e
k.q = e
k.r = h
k.u = h
d.t = b
d.z = b
d.p = i
d.x = h
d.u = h
d.y = h
d.w = h
b.y = h
b.q = h
l.r = h
l.w = h
l.p = b
l.q = b
l.o = b
l.u = f
l.y = j
g.z = b
g.t = b
g.u = l
g.v = f
i.q = h
i.p = g
i.s = g
i.r = l
i.v = l
i.y = j
i.o = k
i.t = d
assert h.x.r.x.u.txt == "h"