class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.v: F = None
        self.p: F = None
        self.z: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.v: I = None
        self.w: I = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.o: J = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: G = None
        self.v: F = None
        self.p: F = None
        self.z: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.v: I = None
        self.w: I = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.x: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.o: J = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

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