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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: C = None
        self.r: C = None
        self.u: B = None
        self.p: F = None
        self.y: I = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: I = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: D = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.p: D = None
        self.r: C = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.z: F = None
        self.y: E = None
        self.v: E = None
        self.p: B = None
        self.x: D = None
        self.t: G = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

i = A("i")
j = B("j")
f = C("f")
c = D("c")
m = E("m")
a = F("a")
b = G("b")
n = H("n")
e = I("e")
h = J("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: C = None
        self.r: C = None
        self.u: B = None
        self.p: F = None
        self.y: I = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: I = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.w: D = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.p: D = None
        self.r: C = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.z: F = None
        self.y: E = None
        self.v: E = None
        self.p: B = None
        self.x: D = None
        self.t: G = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

i = A("i")
j = B("j")
f = C("f")
c = D("c")
m = E("m")
a = F("a")
b = G("b")
n = H("n")
e = I("e")
h = J("h")

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