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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: C = None
        self.t: I = None
        self.w: J = None
        self.z: J = None
        self.p: D = None
        self.u: D = None
        self.v: I = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: G = None
        self.x: C = None
        self.u: H = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.p: A = None
        self.s: G = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.s: A = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.z: F = None
        self.t: A = None
        self.u: E = None
        self.s: H = None
        self.w: H = None
        self.p: I = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: C = None
        self.t: I = None
        self.w: J = None
        self.z: J = None
        self.p: D = None
        self.u: D = None
        self.v: I = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: G = None
        self.x: C = None
        self.u: H = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.p: A = None
        self.s: G = None
        self.v: B = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.s: A = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.z: F = None
        self.t: A = None
        self.u: E = None
        self.s: H = None
        self.w: H = None
        self.p: I = None
        self.x: A = None
        self.txt = txt

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

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