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

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

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

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

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

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

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

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

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

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

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

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

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

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

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