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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: E = None
        self.z: F = None
        self.v: D = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: E = None
        self.z: F = None
        self.v: D = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

g.p = e
g.s = l
l.o = c
l.w = k
l.v = e
j.s = l
j.z = c
c.p = j
c.u = e
c.t = e
c.z = i
c.r = i
c.v = h
e.t = g
e.s = g
e.z = h
i.y = g
i.s = k
k.p = e
k.u = e
k.w = g
k.t = g
h.p = j
h.u = e
h.t = e
h.z = i
h.r = i
h.v = c
assert j.s.v.z.txt == "h"