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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

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

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