class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: C = None
        self.r: E = None
        self.s: D = None
        self.q: F = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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