class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: B = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.w: I = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: B = None
        self.r: G = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: H = None
        self.z: J = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.q: J = None
        self.r: E = None
        self.s: D = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.w: I = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: B = None
        self.r: G = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: H = None
        self.z: J = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.q: J = None
        self.r: E = None
        self.s: D = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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

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