class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: H = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.y: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.y: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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