class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.t: D = 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.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: D = None
        self.o: C = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

n = A("n")
b = B("b")
k = C("k")
j = D("j")
d = E("d")
c = F("c")
m = B("m")
e = B("e")

n.u = k
n.q = m
n.t = j
b.s = d
k.x = b
j.v = c
j.w = n
j.s = n
j.q = n
j.z = k
j.o = k
d.v = c
c.w = k
c.o = k
c.x = k
c.u = j
c.t = d
m.s = d
e.s = d
assert k.x.s.v.u.v.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.t: D = 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.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: D = None
        self.o: C = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

n = A("n")
b = B("b")
k = C("k")
j = D("j")
d = E("d")
c = F("c")
m = B("m")
e = B("e")

n.u = k
n.q = m
n.t = j
b.s = d
k.x = b
j.v = c
j.w = n
j.s = n
j.q = n
j.z = k
j.o = k
d.v = c
c.w = k
c.o = k
c.x = k
c.u = j
c.t = d
m.s = d
e.s = d
assert k.x.s.v.u.v.x.x.txt == "b"