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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.r: A = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.r: A = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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