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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: A = None
        self.w: A = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
h = C("h")
n = D("n")
d = E("d")
j = F("j")
k = C("k")
l = D("l")
m = B("m")
a = F("a")

e.r = a
g.z = d
g.t = e
g.s = n
g.x = m
g.o = j
g.p = k
h.t = m
h.v = l
n.r = l
n.t = m
n.o = m
n.u = d
n.q = d
d.x = m
d.s = e
d.w = e
d.y = a
d.z = l
j.r = m
j.q = l
j.t = k
k.t = m
k.v = l
l.r = n
l.t = m
l.u = d
l.q = d
l.o = g
m.z = d
m.t = e
m.s = l
m.x = g
m.o = a
m.p = h
a.r = m
a.q = l
a.t = h
assert j.r.o.r.p.t.p.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: A = None
        self.w: A = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
h = C("h")
n = D("n")
d = E("d")
j = F("j")
k = C("k")
l = D("l")
m = B("m")
a = F("a")

e.r = a
g.z = d
g.t = e
g.s = n
g.x = m
g.o = j
g.p = k
h.t = m
h.v = l
n.r = l
n.t = m
n.o = m
n.u = d
n.q = d
d.x = m
d.s = e
d.w = e
d.y = a
d.z = l
j.r = m
j.q = l
j.t = k
k.t = m
k.v = l
l.r = n
l.t = m
l.u = d
l.q = d
l.o = g
m.z = d
m.t = e
m.s = l
m.x = g
m.o = a
m.p = h
a.r = m
a.q = l
a.t = h
assert j.r.o.r.p.t.p.v.r.txt == "n"