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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: G = None
        self.t: C = 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.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

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

i = A("i")
h = B("h")
j = C("j")
c = D("c")
l = E("l")
b = F("b")
e = G("e")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: G = None
        self.t: C = 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.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: E = None
        self.y: B = None
        self.txt = txt

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

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

i = A("i")
h = B("h")
j = C("j")
c = D("c")
l = E("l")
b = F("b")
e = G("e")
f = H("f")

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