class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.w: C = None
        self.p: H = None
        self.y: H = None
        self.u: F = None
        self.o: E = None
        self.v: H = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: H = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: J = None
        self.u: A = None
        self.p: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: J = None
        self.w: C = None
        self.u: C = None
        self.z: D = None
        self.o: A = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: H = None
        self.u: A = None
        self.t: J = None
        self.y: D = None
        self.x: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: H = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: J = None
        self.u: A = None
        self.p: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: J = None
        self.w: C = None
        self.u: C = None
        self.z: D = None
        self.o: A = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: H = None
        self.u: A = None
        self.t: J = None
        self.y: D = None
        self.x: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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