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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: D = None
        self.x: E = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.o: C = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.q: A = None
        self.p: A = None
        self.txt = txt

i = A("i")
k = B("k")
f = C("f")
g = D("g")
b = E("b")
h = F("h")
c = D("c")

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: D = None
        self.x: E = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.o: C = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.q: A = None
        self.p: A = None
        self.txt = txt

i = A("i")
k = B("k")
f = C("f")
g = D("g")
b = E("b")
h = F("h")
c = D("c")

i.t = k
k.u = b
k.y = b
f.r = h
f.w = h
f.q = c
f.x = b
g.s = i
g.y = b
g.o = f
g.u = k
b.z = f
b.u = h
h.u = k
h.r = i
h.q = i
h.p = i
c.s = i
c.y = b
c.o = f
c.u = k
assert h.r.t.y.z.txt == "f"