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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.s: G = None
        self.r: G = None
        self.z: F = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.u: C = None
        self.z: D = None
        self.o: A = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

f = A("f")
h = B("h")
c = C("c")
d = D("d")
k = E("k")
e = F("e")
a = G("a")
l = G("l")
i = A("i")

f.z = i
h.p = e
h.q = a
h.v = l
c.z = k
c.t = d
d.q = c
d.u = k
d.s = l
d.r = l
d.z = e
d.x = f
k.v = l
k.p = d
k.q = d
k.t = i
k.s = c
k.u = c
e.t = d
e.v = k
a.x = d
a.z = d
a.s = e
a.u = c
a.y = c
a.o = i
a.r = h
l.x = d
l.z = d
l.s = e
l.u = c
l.y = c
l.o = i
l.r = h
i.z = f
assert d.u.v.r.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.s: G = None
        self.r: G = None
        self.z: F = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: F = None
        self.u: C = None
        self.z: D = None
        self.o: A = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

f = A("f")
h = B("h")
c = C("c")
d = D("d")
k = E("k")
e = F("e")
a = G("a")
l = G("l")
i = A("i")

f.z = i
h.p = e
h.q = a
h.v = l
c.z = k
c.t = d
d.q = c
d.u = k
d.s = l
d.r = l
d.z = e
d.x = f
k.v = l
k.p = d
k.q = d
k.t = i
k.s = c
k.u = c
e.t = d
e.v = k
a.x = d
a.z = d
a.s = e
a.u = c
a.y = c
a.o = i
a.r = h
l.x = d
l.z = d
l.s = e
l.u = c
l.y = c
l.o = i
l.r = h
i.z = f
assert d.u.v.r.v.s.txt == "e"