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

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

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

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

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

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

e = A("e")
c = B("c")
l = C("l")
b = D("b")
a = E("a")
j = F("j")
k = B("k")

e.w = j
e.t = j
c.x = e
c.u = e
c.r = j
c.p = a
c.v = k
c.q = l
l.w = e
l.q = e
l.x = c
b.v = a
b.r = e
b.p = j
b.z = l
a.p = b
j.p = c
j.r = c
j.s = a
k.x = e
k.u = e
k.r = j
k.p = a
k.v = c
k.q = l
assert b.v.p.z.x.q.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

e = A("e")
c = B("c")
l = C("l")
b = D("b")
a = E("a")
j = F("j")
k = B("k")

e.w = j
e.t = j
c.x = e
c.u = e
c.r = j
c.p = a
c.v = k
c.q = l
l.w = e
l.q = e
l.x = c
b.v = a
b.r = e
b.p = j
b.z = l
a.p = b
j.p = c
j.r = c
j.s = a
k.x = e
k.u = e
k.r = j
k.p = a
k.v = c
k.q = l
assert b.v.p.z.x.q.x.x.txt == "e"