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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.x: E = None
        self.s: B = None
        self.w: B = None
        self.t: G = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.r: D = None
        self.o: C = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.x: E = None
        self.s: B = None
        self.w: B = None
        self.t: G = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: F = None
        self.r: D = None
        self.o: C = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

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

a.t = k
j.v = a
n.r = j
n.s = j
n.w = j
n.y = b
n.x = b
n.t = k
n.o = a
n.q = e
f.v = e
f.t = j
b.r = e
b.s = e
b.q = a
e.o = f
e.w = f
e.s = n
k.q = a
k.y = a
k.r = e
k.u = f
k.s = n
k.t = j
l.v = n
l.o = n
l.s = e
l.r = f
l.y = j
l.w = a
assert j.v.t.y.t.q.t.txt == "k"