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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: G = None
        self.o: J = None
        self.z: B = None
        self.v: G = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.y: G = None
        self.t: H = None
        self.q: J = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.q: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: G = None
        self.o: J = None
        self.z: B = None
        self.v: G = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: I = None
        self.y: G = None
        self.t: H = None
        self.q: J = None
        self.o: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.q: E = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

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

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