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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: A = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.t: J = None
        self.u: J = None
        self.w: G = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.o: D = None
        self.q: B = None
        self.t: J = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.t: B = None
        self.q: B = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: A = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: H = None
        self.t: J = None
        self.u: J = None
        self.w: G = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.o: D = None
        self.q: B = None
        self.t: J = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.t: B = None
        self.q: B = None
        self.p: F = None
        self.txt = txt

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

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