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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: F = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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