class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.v: B = None
        self.p: D = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.v: C = None
        self.u: F = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.v: C = None
        self.u: F = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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