class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: J = None
        self.o: I = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: G = None
        self.z: E = None
        self.o: J = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: E = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.s: F = None
        self.r: E = None
        self.y: E = None
        self.o: B = None
        self.v: F = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: E = None
        self.u: E = None
        self.s: E = None
        self.z: I = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: G = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: G = None
        self.z: E = None
        self.o: J = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: E = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.r: D = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.s: F = None
        self.r: E = None
        self.y: E = None
        self.o: B = None
        self.v: F = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: E = None
        self.u: E = None
        self.s: E = None
        self.z: I = None
        self.x: G = None
        self.txt = txt

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

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