class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: C = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: B = None
        self.r: E = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.t: C = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.txt = txt

b = A("b")
j = B("j")
c = C("c")
f = D("f")
g = E("g")
k = F("k")
e = D("e")
d = C("d")

b.t = g
b.u = d
b.x = k
b.v = e
j.w = c
c.o = g
f.s = d
f.o = j
f.r = g
f.q = c
f.x = e
g.o = j
g.r = d
g.t = d
g.x = f
g.y = k
k.x = c
k.s = c
e.s = c
e.o = j
e.r = g
e.q = d
e.x = f
d.o = g
assert c.o.t.o.t.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: C = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: B = None
        self.r: E = None
        self.q: C = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.t: C = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.txt = txt

b = A("b")
j = B("j")
c = C("c")
f = D("f")
g = E("g")
k = F("k")
e = D("e")
d = C("d")

b.t = g
b.u = d
b.x = k
b.v = e
j.w = c
c.o = g
f.s = d
f.o = j
f.r = g
f.q = c
f.x = e
g.o = j
g.r = d
g.t = d
g.x = f
g.y = k
k.x = c
k.s = c
e.s = c
e.o = j
e.r = g
e.q = d
e.x = f
d.o = g
assert c.o.t.o.t.o.o.txt == "j"