class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: I = None
        self.o: F = None
        self.u: H = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.u: B = None
        self.p: A = None
        self.x: D = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.v: I = None
        self.r: C = None
        self.s: C = None
        self.w: I = None
        self.q: F = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: B = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.u: B = None
        self.p: A = None
        self.x: D = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.v: I = None
        self.r: C = None
        self.s: C = None
        self.w: I = None
        self.q: F = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: B = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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