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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

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

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

l.t = c
l.w = j
l.x = e
l.v = h
i.p = m
i.u = l
e.x = l
e.s = l
e.w = m
c.z = l
m.t = j
m.o = j
m.u = l
m.q = e
j.p = e
d.z = l
h.p = m
h.u = l
assert c.z.v.p.o.p.x.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: F = None
        self.x: C = None
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.u: A = None
        self.q: C = None
        self.txt = txt

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

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

l.t = c
l.w = j
l.x = e
l.v = h
i.p = m
i.u = l
e.x = l
e.s = l
e.w = m
c.z = l
m.t = j
m.o = j
m.u = l
m.q = e
j.p = e
d.z = l
h.p = m
h.u = l
assert c.z.v.p.o.p.x.x.w.txt == "m"