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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.q: F = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.u: D = None
        self.s: C = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.q: F = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.u: D = None
        self.s: C = None
        self.p: F = None
        self.txt = txt

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

c.o = m
c.r = i
c.x = l
a.r = i
a.t = i
a.o = c
a.q = b
a.v = g
l.p = n
m.z = n
m.x = n
m.p = e
n.o = c
n.x = k
n.z = e
n.q = l
k.w = m
k.u = m
k.q = c
k.s = l
k.p = b
i.w = m
i.u = m
i.q = c
i.s = e
i.p = k
e.p = n
b.w = m
b.u = m
b.q = c
b.s = e
b.p = i
g.r = k
g.o = c
g.q = b
g.v = a
g.t = i
assert l.p.z.p.o.o.txt == "m"