class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.o: B = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: H = None
        self.v: G = None
        self.w: A = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: H = None
        self.v: G = None
        self.w: A = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: G = None
        self.txt = txt

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

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

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

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

g.x = b
g.t = i
g.o = n
g.v = f
n.r = f
n.t = l
n.u = i
n.p = g
b.v = a
b.y = g
b.z = j
b.o = c
c.y = i
c.v = i
c.q = a
c.w = g
c.z = g
f.p = g
f.x = i
j.u = e
j.q = i
i.y = f
i.r = j
i.w = g
i.t = b
a.o = f
e.u = j
e.q = i
l.u = j
l.q = i
assert j.q.t.z.txt == "j"