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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: E = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.w: C = None
        self.r: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: E = None
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: B = None
        self.w: C = None
        self.r: B = None
        self.x: D = None
        self.txt = txt

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

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