class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.y: G = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.u: E = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.u: G = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.y: G = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: A = None
        self.u: E = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.u: G = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

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

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