class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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