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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.q: D = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: G = None
        self.r: H = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.q: D = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: G = None
        self.r: H = None
        self.o: B = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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