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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: B = None
        self.z: E = None
        self.q: H = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: E = None
        self.u: I = None
        self.q: B = None
        self.z: H = None
        self.o: H = None
        self.w: G = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.p: G = None
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: B = None
        self.z: E = None
        self.q: H = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: E = None
        self.u: I = None
        self.q: B = None
        self.z: H = None
        self.o: H = None
        self.w: G = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.p: G = None
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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