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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.w: B = None
        self.r: E = None
        self.t: B = None
        self.x: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: D = None
        self.x: B = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.z: A = None
        self.p: C = None
        self.r: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.w: B = None
        self.r: E = None
        self.t: B = None
        self.x: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: D = None
        self.x: B = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.z: A = None
        self.p: C = None
        self.r: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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