class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: E = None
        self.r: B = None
        self.y: D = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.u: F = None
        self.o: I = None
        self.z: A = None
        self.w: J = None
        self.x: F = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.q: H = None
        self.v: A = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.u: F = None
        self.o: I = None
        self.z: A = None
        self.w: J = None
        self.x: F = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: D = None
        self.q: H = None
        self.v: A = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

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

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