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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.o: C = None
        self.w: C = None
        self.s: H = None
        self.z: C = None
        self.q: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

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

a = A("a")
m = B("m")
b = C("b")
c = D("c")
e = E("e")
h = F("h")
k = G("k")
f = H("f")
l = E("l")
n = A("n")

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: E = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.o: C = None
        self.w: C = None
        self.s: H = None
        self.z: C = None
        self.q: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.t: G = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

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

a = A("a")
m = B("m")
b = C("b")
c = D("c")
e = E("e")
h = F("h")
k = G("k")
f = H("f")
l = E("l")
n = A("n")

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