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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

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

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

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

f = A("f")
l = B("l")
d = C("d")
a = D("a")
n = E("n")
g = F("g")
i = G("i")
e = H("e")
c = G("c")
k = C("k")

f.p = c
f.t = n
f.x = a
f.u = a
l.t = a
l.z = k
l.y = n
l.s = n
l.w = n
l.x = n
l.q = n
l.u = e
d.s = a
d.p = e
a.u = f
n.x = e
n.y = e
n.w = f
g.z = a
g.x = a
g.u = a
g.w = k
g.t = l
g.y = f
g.s = i
i.v = l
i.p = k
e.s = f
e.w = f
c.v = l
c.p = k
k.s = a
k.p = e
assert l.y.x.w.p.v.t.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: E = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

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

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

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

f = A("f")
l = B("l")
d = C("d")
a = D("a")
n = E("n")
g = F("g")
i = G("i")
e = H("e")
c = G("c")
k = C("k")

f.p = c
f.t = n
f.x = a
f.u = a
l.t = a
l.z = k
l.y = n
l.s = n
l.w = n
l.x = n
l.q = n
l.u = e
d.s = a
d.p = e
a.u = f
n.x = e
n.y = e
n.w = f
g.z = a
g.x = a
g.u = a
g.w = k
g.t = l
g.y = f
g.s = i
i.v = l
i.p = k
e.s = f
e.w = f
c.v = l
c.p = k
k.s = a
k.p = e
assert l.y.x.w.p.v.t.u.t.txt == "n"