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

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

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

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

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

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

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

e.y = i
e.p = i
e.t = m
l.w = i
l.t = m
l.u = e
i.t = j
i.w = f
i.u = f
i.o = f
g.t = e
g.o = m
g.y = m
g.z = c
j.t = g
m.x = j
m.y = g
c.t = e
c.o = m
c.y = m
c.z = g
f.w = i
f.t = m
f.u = e
assert e.t.x.t.o.x.t.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

e.y = i
e.p = i
e.t = m
l.w = i
l.t = m
l.u = e
i.t = j
i.w = f
i.u = f
i.o = f
g.t = e
g.o = m
g.y = m
g.z = c
j.t = g
m.x = j
m.y = g
c.t = e
c.o = m
c.y = m
c.z = g
f.w = i
f.t = m
f.u = e
assert e.t.x.t.o.x.t.z.o.txt == "m"