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

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

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

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

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

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

l = A("l")
e = B("e")
b = C("b")
i = D("i")
j = E("j")
h = F("h")
g = C("g")
n = B("n")
c = F("c")

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

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

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

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

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

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

l = A("l")
e = B("e")
b = C("b")
i = D("i")
j = E("j")
h = F("h")
g = C("g")
n = B("n")
c = F("c")

l.w = h
l.y = c
l.u = b
l.z = n
e.p = j
e.s = j
e.y = l
e.o = l
e.v = i
e.q = n
b.s = j
b.t = j
i.v = h
j.s = g
j.u = n
j.x = n
j.v = l
j.w = i
j.z = e
h.x = c
g.s = j
g.t = j
n.p = j
n.s = j
n.y = l
n.o = l
n.v = i
n.q = e
c.x = h
assert c.x.x.x.x.x.x.txt == "c"