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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.x: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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