class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.v: D = None
        self.z: H = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: H = None
        self.w: E = None
        self.v: F = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: H = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.t: E = None
        self.r: G = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.v: D = None
        self.z: H = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: H = None
        self.w: E = None
        self.v: F = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: H = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.t: E = None
        self.r: G = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

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