class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.z: H = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.o: J = None
        self.y: E = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: F = None
        self.p: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: B = None
        self.y: B = None
        self.x: C = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.w: F = None
        self.p: A = None
        self.v: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.o: J = None
        self.y: E = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: F = None
        self.p: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: B = None
        self.y: B = None
        self.x: C = None
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: F = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: C = None
        self.w: F = None
        self.p: A = None
        self.v: E = None
        self.txt = txt

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

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

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