class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: B = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.t: E = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.t: E = None
        self.txt = txt

c = A("c")
a = B("a")
k = C("k")
j = D("j")
i = E("i")
g = E("g")
f = E("f")
d = E("d")
n = C("n")

c.s = n
c.r = a
c.z = f
c.x = g
a.v = i
a.y = k
a.q = c
a.z = j
k.z = d
k.v = j
k.x = j
k.t = g
k.o = g
j.v = i
j.r = k
i.y = c
i.p = n
i.t = d
g.y = c
g.p = n
g.t = d
f.y = c
f.p = k
f.t = g
d.y = c
d.p = n
d.t = g
n.z = f
n.v = j
n.x = j
n.t = g
n.o = g
assert g.t.t.y.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: B = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.t: E = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.t: E = None
        self.txt = txt

c = A("c")
a = B("a")
k = C("k")
j = D("j")
i = E("i")
g = E("g")
f = E("f")
d = E("d")
n = C("n")

c.s = n
c.r = a
c.z = f
c.x = g
a.v = i
a.y = k
a.q = c
a.z = j
k.z = d
k.v = j
k.x = j
k.t = g
k.o = g
j.v = i
j.r = k
i.y = c
i.p = n
i.t = d
g.y = c
g.p = n
g.t = d
f.y = c
f.p = k
f.t = g
d.y = c
d.p = n
d.t = g
n.z = f
n.v = j
n.x = j
n.t = g
n.o = g
assert g.t.t.y.s.t.txt == "g"