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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.w: I = None
        self.s: B = None
        self.z: H = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: D = None
        self.o: B = None
        self.r: B = None
        self.q: A = None
        self.s: A = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: D = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.w: I = None
        self.s: B = None
        self.z: H = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: D = None
        self.o: B = None
        self.r: B = None
        self.q: A = None
        self.s: A = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: D = None
        self.u: H = None
        self.txt = txt

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

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