class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: F = None
        self.r: I = None
        self.x: E = None
        self.u: C = None
        self.q: D = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: F = None
        self.r: H = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.r: D = None
        self.u: D = None
        self.t: I = None
        self.y: G = None
        self.p: I = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: I = None
        self.z: B = None
        self.v: H = None
        self.p: B = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.v: H = None
        self.t: F = None
        self.x: C = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.r: D = None
        self.x: F = None
        self.txt = txt

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

m.z = f
m.q = f
m.s = i
m.r = g
m.x = l
m.u = j
m.v = b
d.u = m
d.p = m
d.s = b
d.q = j
d.w = j
d.y = g
d.t = l
d.r = l
j.p = h
j.o = i
j.v = i
j.r = b
j.u = m
f.v = h
f.o = h
l.v = d
l.o = b
l.w = b
l.r = f
l.u = f
l.t = g
l.p = g
l.y = a
i.t = h
a.w = h
a.y = h
a.u = g
a.z = d
a.p = d
a.v = b
b.p = i
b.v = i
g.r = b
g.v = b
g.q = b
g.o = i
g.t = i
g.x = j
g.u = l
h.u = a
h.y = i
h.x = i
h.r = f
assert j.p.r.o.u.u.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: F = None
        self.r: I = None
        self.x: E = None
        self.u: C = None
        self.q: D = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: F = None
        self.r: H = None
        self.u: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.r: D = None
        self.u: D = None
        self.t: I = None
        self.y: G = None
        self.p: I = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: I = None
        self.z: B = None
        self.v: H = None
        self.p: B = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: F = None
        self.v: H = None
        self.t: F = None
        self.x: C = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.r: D = None
        self.x: F = None
        self.txt = txt

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

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