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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: E = None
        self.w: F = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

l = A("l")
n = B("n")
a = C("a")
c = D("c")
e = E("e")
g = F("g")
j = G("j")
b = A("b")
h = G("h")

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: E = None
        self.w: F = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

l = A("l")
n = B("n")
a = C("a")
c = D("c")
e = E("e")
g = F("g")
j = G("j")
b = A("b")
h = G("h")

l.s = c
l.v = h
l.p = h
l.z = e
l.x = b
n.q = g
n.w = g
n.o = e
n.z = h
n.r = h
a.v = c
c.x = b
c.z = n
c.y = n
c.s = a
c.w = a
e.t = g
e.s = l
e.w = a
g.r = n
g.v = j
g.t = h
j.u = a
j.y = h
j.z = c
j.t = e
j.x = n
j.p = g
b.s = c
b.v = j
b.z = e
b.p = h
b.x = l
h.u = a
h.y = j
h.z = c
h.t = e
h.x = n
h.p = g
assert l.p.x.o.s.p.z.x.p.txt == "h"