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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.r: F = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.r: F = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

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

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

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