class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: J = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: F = None
        self.p: I = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: I = None
        self.v: D = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.s: E = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.z: E = None
        self.w: F = None
        self.u: B = None
        self.y: J = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: F = None
        self.p: I = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: I = None
        self.v: D = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.s: E = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.z: E = None
        self.w: F = None
        self.u: B = None
        self.y: J = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

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

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

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