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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: A = None
        self.p: B = None
        self.y: F = None
        self.x: F = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.r: F = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: A = None
        self.p: B = None
        self.y: F = None
        self.x: F = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: F = None
        self.r: F = None
        self.z: A = None
        self.txt = txt

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

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