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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

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

l.q = a
l.r = b
l.v = b
l.u = b
l.o = e
l.y = c
c.w = k
a.x = b
a.u = b
k.v = e
k.w = a
b.s = e
b.t = c
e.v = b
assert a.x.s.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: E = None
        self.o: F = None
        self.v: E = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

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

l.q = a
l.r = b
l.v = b
l.u = b
l.o = e
l.y = c
c.w = k
a.x = b
a.u = b
k.v = e
k.w = a
b.s = e
b.t = c
e.v = b
assert a.x.s.v.t.txt == "c"