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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: E = None
        self.v: H = None
        self.p: I = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: B = None
        self.r: D = None
        self.x: A = None
        self.z: H = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.s: B = None
        self.w: B = None
        self.o: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.u: H = None
        self.v: D = None
        self.w: I = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.w: F = None
        self.u: F = None
        self.r: A = None
        self.o: I = None
        self.q: E = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: E = None
        self.v: H = None
        self.p: I = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: B = None
        self.r: D = None
        self.x: A = None
        self.z: H = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.s: B = None
        self.w: B = None
        self.o: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.u: H = None
        self.v: D = None
        self.w: I = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: E = None
        self.w: F = None
        self.u: F = None
        self.r: A = None
        self.o: I = None
        self.q: E = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

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

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