class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.q: C = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: D = None
        self.u: F = None
        self.y: F = None
        self.o: D = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.v: C = None
        self.o: C = None
        self.y: G = None
        self.x: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

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

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

h.x = i
h.u = c
h.q = n
h.y = d
h.s = e
b.q = k
b.u = k
b.y = k
b.z = e
b.o = e
b.t = i
b.w = c
n.z = c
n.x = c
n.w = k
n.v = i
n.y = i
n.o = d
n.q = e
e.t = i
e.w = c
c.u = k
c.t = d
c.y = d
c.x = d
c.v = n
c.o = n
c.p = b
k.q = i
d.y = c
d.w = k
d.o = i
i.t = b
i.w = b
i.x = n
i.y = d
i.v = k
i.q = e
i.u = e
i.z = c
assert i.y.y.x.y.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.q: C = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: D = None
        self.u: F = None
        self.y: F = None
        self.o: D = None
        self.t: H = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.v: C = None
        self.o: C = None
        self.y: G = None
        self.x: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

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

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

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