class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.y: J = None
        self.r: E = None
        self.u: C = None
        self.v: E = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.t: A = None
        self.w: J = None
        self.s: C = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: J = None
        self.z: H = None
        self.s: F = None
        self.y: B = None
        self.p: D = None
        self.v: D = None
        self.o: H = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: C = None
        self.u: D = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.t: A = None
        self.w: J = None
        self.s: C = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: J = None
        self.z: H = None
        self.s: F = None
        self.y: B = None
        self.p: D = None
        self.v: D = None
        self.o: H = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: C = None
        self.u: D = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: H = None
        self.y: C = None
        self.txt = txt

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

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