class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.q: F = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.u: I = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: J = None
        self.v: I = None
        self.z: E = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.x: F = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.u: I = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: J = None
        self.v: I = None
        self.z: E = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.x: F = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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