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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: H = None
        self.o: F = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.r: G = None
        self.t: I = None
        self.v: I = None
        self.p: D = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: H = None
        self.o: F = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.r: G = None
        self.t: I = None
        self.v: I = None
        self.p: D = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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