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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: H = None
        self.s: F = None
        self.r: B = None
        self.z: A = None
        self.v: C = None
        self.p: C = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: H = None
        self.s: F = None
        self.r: B = None
        self.z: A = None
        self.v: C = None
        self.p: C = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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