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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.p: A = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.p: A = None
        self.v: F = None
        self.txt = txt

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

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

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