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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.u: G = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.u: G = None
        self.v: E = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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