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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: G = None
        self.z: A = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: G = None
        self.x: B = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: G = None
        self.z: A = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: G = None
        self.x: B = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.txt = txt

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

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

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