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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: C = None
        self.r: D = None
        self.p: E = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: G = None
        self.r: B = None
        self.p: D = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: C = None
        self.r: D = None
        self.p: E = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: G = None
        self.r: B = None
        self.p: D = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

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

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

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