class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: J = None
        self.u: E = None
        self.v: E = None
        self.s: F = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.v: F = None
        self.q: C = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: J = None
        self.u: E = None
        self.v: E = None
        self.s: F = None
        self.r: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.q: F = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.v: F = None
        self.q: C = None
        self.y: F = None
        self.z: C = None
        self.txt = txt

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

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