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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.t: H = None
        self.s: I = None
        self.u: H = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.v: E = None
        self.o: J = None
        self.r: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.u: C = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.t: H = None
        self.s: I = None
        self.u: H = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.v: E = None
        self.o: J = None
        self.r: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.u: C = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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