class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.w: I = None
        self.o: I = None
        self.s: B = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: C = None
        self.z: D = None
        self.s: F = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: F = None
        self.o: J = None
        self.w: D = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: H = None
        self.w: A = None
        self.x: D = None
        self.q: H = None
        self.p: C = None
        self.v: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: F = None
        self.v: C = None
        self.s: E = None
        self.q: G = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: C = None
        self.z: D = None
        self.s: F = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: F = None
        self.o: J = None
        self.w: D = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: H = None
        self.w: A = None
        self.x: D = None
        self.q: H = None
        self.p: C = None
        self.v: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: F = None
        self.v: C = None
        self.s: E = None
        self.q: G = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: I = None
        self.txt = txt

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

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