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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.z: D = None
        self.s: A = None
        self.v: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.p: G = None
        self.v: I = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.z: D = None
        self.s: A = None
        self.v: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.p: G = None
        self.v: I = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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