class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: E = None
        self.r: B = None
        self.q: D = None
        self.s: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.o: D = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: B = None
        self.u: D = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.o: D = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: B = None
        self.u: D = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

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