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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: I = None
        self.s: A = None
        self.x: E = None
        self.v: B = None
        self.p: D = None
        self.z: B = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.q: H = None
        self.w: I = None
        self.u: B = None
        self.v: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: F = None
        self.u: G = None
        self.w: I = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: I = None
        self.s: A = None
        self.x: E = None
        self.v: B = None
        self.p: D = None
        self.z: B = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.q: H = None
        self.w: I = None
        self.u: B = None
        self.v: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: F = None
        self.u: G = None
        self.w: I = None
        self.q: A = None
        self.txt = txt

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

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

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