class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: A = None
        self.u: C = None
        self.r: C = None
        self.x: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: E = None
        self.r: B = None
        self.t: C = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: D = None
        self.s: H = None
        self.z: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: G = None
        self.y: B = None
        self.u: B = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: A = None
        self.u: C = None
        self.r: C = None
        self.x: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: E = None
        self.r: B = None
        self.t: C = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: D = None
        self.s: H = None
        self.z: H = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: G = None
        self.y: B = None
        self.u: B = None
        self.x: G = None
        self.txt = txt

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

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

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

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