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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: B = None
        self.x: A = None
        self.z: E = None
        self.p: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.w: D = None
        self.o: D = None
        self.u: G = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

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

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

a.t = h
a.u = e
a.s = e
a.q = k
a.w = j
a.v = j
j.t = e
j.q = k
e.r = l
e.t = l
e.v = j
e.x = a
e.z = n
e.p = n
l.s = a
n.x = k
n.z = k
n.p = k
n.w = l
n.o = l
n.u = h
n.t = e
k.s = h
h.p = j
assert j.t.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.q: F = None
        self.w: B = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: B = None
        self.x: A = None
        self.z: E = None
        self.p: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.w: D = None
        self.o: D = None
        self.u: G = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

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

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

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

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