class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.s: G = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: E = None
        self.w: C = None
        self.q: B = None
        self.y: G = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

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

k.x = l
a.o = l
a.u = k
g.x = j
g.p = j
g.s = e
g.o = e
g.q = l
n.o = c
l.z = b
c.u = b
c.s = l
c.w = g
c.q = a
c.v = a
c.y = e
c.o = k
e.x = b
j.o = c
b.x = n
b.p = j
b.s = e
b.o = e
b.q = l
assert e.x.o.x.s.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.s: G = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: E = None
        self.w: C = None
        self.q: B = None
        self.y: G = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

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

k.x = l
a.o = l
a.u = k
g.x = j
g.p = j
g.s = e
g.o = e
g.q = l
n.o = c
l.z = b
c.u = b
c.s = l
c.w = g
c.q = a
c.v = a
c.y = e
c.o = k
e.x = b
j.o = c
b.x = n
b.p = j
b.s = e
b.o = e
b.q = l
assert e.x.o.x.s.x.x.txt == "n"