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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: A = None
        self.v: A = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: A = None
        self.v: A = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.txt = txt

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

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