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

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

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

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

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

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

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

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

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

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

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

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

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

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

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