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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: A = None
        self.r: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.w: I = None
        self.y: G = None
        self.q: I = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: A = None
        self.r: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.w: I = None
        self.y: G = None
        self.q: I = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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