class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.x: D = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.q: E = None
        self.x: C = None
        self.p: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.w: C = None
        self.v: E = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

i = A("i")
n = B("n")
g = C("g")
h = D("h")
a = E("a")
e = F("e")
d = G("d")
b = H("b")
j = G("j")
f = E("f")

i.o = f
i.r = b
i.p = a
n.z = i
n.q = e
n.x = h
n.w = j
g.u = h
g.x = h
g.r = a
g.y = a
g.o = e
g.z = f
g.q = j
h.o = f
h.x = b
a.p = h
a.q = j
e.r = b
e.p = b
e.o = h
e.q = f
e.x = g
e.y = j
d.u = h
d.s = e
d.y = e
d.w = g
d.r = g
d.v = a
b.s = j
j.u = h
j.s = e
j.y = e
j.w = g
j.r = g
j.v = a
f.p = h
f.q = j
assert g.r.q.y.o.x.s.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.x: D = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.q: E = None
        self.x: C = None
        self.p: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.w: C = None
        self.v: E = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

i = A("i")
n = B("n")
g = C("g")
h = D("h")
a = E("a")
e = F("e")
d = G("d")
b = H("b")
j = G("j")
f = E("f")

i.o = f
i.r = b
i.p = a
n.z = i
n.q = e
n.x = h
n.w = j
g.u = h
g.x = h
g.r = a
g.y = a
g.o = e
g.z = f
g.q = j
h.o = f
h.x = b
a.p = h
a.q = j
e.r = b
e.p = b
e.o = h
e.q = f
e.x = g
e.y = j
d.u = h
d.s = e
d.y = e
d.w = g
d.r = g
d.v = a
b.s = j
j.u = h
j.s = e
j.y = e
j.w = g
j.r = g
j.v = a
f.p = h
f.q = j
assert g.r.q.y.o.x.s.v.p.txt == "h"