class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: G = None
        self.r: C = None
        self.z: B = None
        self.o: G = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.x: H = None
        self.o: B = None
        self.q: F = None
        self.v: B = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: B = None
        self.q: H = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: G = None
        self.r: C = None
        self.z: B = None
        self.o: G = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.x: H = None
        self.o: B = None
        self.q: F = None
        self.v: B = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: B = None
        self.q: H = None
        self.u: A = None
        self.y: E = None
        self.txt = txt

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

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

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