class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: G = None
        self.x: C = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: D = None
        self.x: E = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.v: I = None
        self.y: D = None
        self.x: D = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.s: H = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: D = None
        self.x: E = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.v: I = None
        self.y: D = None
        self.x: D = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.s: H = None
        self.q: B = None
        self.txt = txt

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

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

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

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