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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: G = None
        self.s: F = None
        self.t: E = None
        self.p: C = None
        self.o: D = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.s: F = None
        self.r: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.r: C = None
        self.o: E = None
        self.y: D = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: G = None
        self.s: F = None
        self.t: E = None
        self.p: C = None
        self.o: D = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.s: F = None
        self.r: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.r: C = None
        self.o: E = None
        self.y: D = None
        self.q: B = None
        self.w: G = None
        self.txt = txt

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

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