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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: G = None
        self.s: B = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: H = None
        self.q: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: G = None
        self.s: B = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: H = None
        self.q: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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