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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.q: D = None
        self.t: B = None
        self.r: G = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.u: A = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

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

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

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

h = A("h")
f = B("f")
d = C("d")
a = D("a")
k = E("k")
g = F("g")
i = G("i")
m = B("m")
n = G("n")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: G = None
        self.q: D = None
        self.t: B = None
        self.r: G = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: E = None
        self.u: A = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

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

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

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

h = A("h")
f = B("f")
d = C("d")
a = D("a")
k = E("k")
g = F("g")
i = G("i")
m = B("m")
n = G("n")
l = E("l")

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