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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.t: E = None
        self.u: D = None
        self.w: E = None
        self.p: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.txt = txt

l = A("l")
b = B("b")
e = C("e")
n = D("n")
i = E("i")
c = F("c")
k = G("k")

l.x = n
l.w = e
b.x = i
b.o = l
b.r = c
e.q = b
e.y = l
e.r = l
e.t = i
e.w = i
e.u = n
e.p = n
n.q = l
n.w = l
n.r = l
n.z = i
n.t = c
i.p = l
i.v = b
c.u = e
k.o = e
k.q = b
assert c.u.p.w.x.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: A = None
        self.t: E = None
        self.u: D = None
        self.w: E = None
        self.p: D = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.txt = txt

l = A("l")
b = B("b")
e = C("e")
n = D("n")
i = E("i")
c = F("c")
k = G("k")

l.x = n
l.w = e
b.x = i
b.o = l
b.r = c
e.q = b
e.y = l
e.r = l
e.t = i
e.w = i
e.u = n
e.p = n
n.q = l
n.w = l
n.r = l
n.z = i
n.t = c
i.p = l
i.v = b
c.u = e
k.o = e
k.q = b
assert c.u.p.w.x.t.u.txt == "e"