class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.p: E = None
        self.u: D = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.u: J = None
        self.p: A = None
        self.t: D = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: D = None
        self.s: H = None
        self.t: I = None
        self.o: I = None
        self.w: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: C = None
        self.s: H = None
        self.w: I = None
        self.y: A = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: F = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.u: C = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.u: J = None
        self.p: A = None
        self.t: D = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: D = None
        self.s: H = None
        self.t: I = None
        self.o: I = None
        self.w: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: C = None
        self.s: H = None
        self.w: I = None
        self.y: A = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: F = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.u: C = None
        self.q: C = None
        self.txt = txt

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

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