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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: G = None
        self.v: B = None
        self.p: H = None
        self.o: F = None
        self.x: H = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

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

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

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

i = A("i")
e = B("e")
d = C("d")
h = D("h")
j = E("j")
k = F("k")
n = G("n")
m = H("m")
l = G("l")
g = E("g")

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: G = None
        self.v: B = None
        self.p: H = None
        self.o: F = None
        self.x: H = None
        self.s: G = None
        self.r: E = None
        self.txt = txt

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

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

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

i = A("i")
e = B("e")
d = C("d")
h = D("h")
j = E("j")
k = F("k")
n = G("n")
m = H("m")
l = G("l")
g = E("g")

i.p = j
i.s = h
e.r = i
e.x = i
e.z = k
e.p = l
d.p = n
h.x = k
h.p = i
j.t = h
j.q = n
j.v = e
j.p = m
j.x = m
j.o = k
j.s = l
j.r = g
k.w = i
n.t = e
n.r = i
n.x = d
n.s = l
m.t = e
m.o = g
m.s = h
m.v = h
m.r = h
m.y = k
m.u = i
m.w = d
l.t = e
l.r = i
l.x = d
l.s = n
g.t = h
g.q = l
g.s = l
g.v = e
g.p = m
g.x = m
g.o = k
g.r = j
assert g.x.u.s.p.s.p.p.o.txt == "k"