class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: E = None
        self.x: E = None
        self.y: G = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.t: F = None
        self.x: C = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

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

l.r = h
l.v = f
l.q = f
n.z = l
n.v = j
n.q = g
n.s = g
n.p = h
n.y = h
n.w = f
j.q = a
j.p = i
j.s = g
i.v = a
i.y = a
i.r = g
i.x = g
i.w = g
i.p = g
g.u = f
g.r = n
g.q = e
g.v = h
g.s = l
e.x = n
f.y = h
f.v = j
f.x = j
f.t = e
f.p = i
f.s = n
h.q = a
h.p = i
h.s = g
a.y = h
a.v = h
a.x = h
a.t = e
a.p = i
a.s = n
k.r = h
k.v = a
k.q = f
assert l.r.s.q.x.v.q.p.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: E = None
        self.x: E = None
        self.y: G = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.t: F = None
        self.x: C = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

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

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