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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.x: A = None
        self.t: B = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.x: A = None
        self.t: B = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

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