class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.w: A = None
        self.u: G = None
        self.txt = txt

j = A("j")
n = B("n")
a = C("a")
d = D("d")
c = E("c")
h = F("h")
b = G("b")
i = H("i")
k = F("k")
f = G("f")

j.x = i
n.v = i
n.u = i
n.s = i
n.t = b
n.x = h
n.w = a
a.t = j
d.z = a
c.w = b
c.r = k
c.s = d
h.t = a
h.q = a
h.p = d
h.u = k
h.y = j
h.z = i
h.v = c
b.o = f
b.y = f
b.u = d
i.r = c
i.q = k
i.w = j
i.u = f
k.t = a
k.q = a
k.p = d
k.u = h
k.y = j
k.z = i
k.v = c
f.o = b
f.y = b
f.u = d
assert i.u.u.z.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.w: A = None
        self.u: G = None
        self.txt = txt

j = A("j")
n = B("n")
a = C("a")
d = D("d")
c = E("c")
h = F("h")
b = G("b")
i = H("i")
k = F("k")
f = G("f")

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