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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.z: D = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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

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

i.v = k
j.r = b
j.x = f
j.p = e
e.p = b
e.o = m
e.w = j
h.q = i
l.r = n
l.z = b
l.w = f
l.u = m
l.t = i
l.o = e
b.w = n
b.t = l
b.z = k
b.q = k
b.o = i
f.t = m
f.o = j
f.v = j
f.x = i
f.u = i
f.p = b
f.r = b
f.s = n
m.t = n
n.r = l
n.z = b
n.w = f
n.u = m
n.t = i
n.o = e
k.q = i
assert i.v.q.v.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.z: D = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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

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

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