class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: F = None
        self.y: F = None
        self.s: F = None
        self.o: I = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.r: E = None
        self.o: C = None
        self.x: G = None
        self.w: F = None
        self.y: D = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.r: I = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.p: D = None
        self.x: B = None
        self.t: F = None
        self.y: B = None
        self.s: F = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.r: E = None
        self.o: C = None
        self.x: G = None
        self.w: F = None
        self.y: D = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.r: I = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.p: D = None
        self.x: B = None
        self.t: F = None
        self.y: B = None
        self.s: F = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

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

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

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

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