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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

c.t = g
c.y = j
c.x = b
d.x = g
d.s = j
d.t = e
d.q = e
b.p = c
b.y = j
b.u = d
i.p = g
i.t = j
g.o = e
g.r = e
g.v = e
g.z = c
g.x = j
g.u = i
e.p = i
e.q = c
e.w = g
j.p = g
j.t = i
m.p = c
m.y = j
m.u = d
assert g.x.t.t.txt == "j"