class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: I = None
        self.u: F = None
        self.s: I = None
        self.w: H = None
        self.o: D = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.z: C = None
        self.w: F = None
        self.p: G = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: A = None
        self.x: C = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.z: A = None
        self.o: E = None
        self.v: G = None
        self.w: C = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: A = None
        self.q: E = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.z: C = None
        self.w: F = None
        self.p: G = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: A = None
        self.x: C = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.z: A = None
        self.o: E = None
        self.v: G = None
        self.w: C = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: A = None
        self.q: E = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

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

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