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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: I = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.p: D = None
        self.v: H = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: I = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.p: D = None
        self.v: H = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

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

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