class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: G = None
        self.w: I = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: E = None
        self.y: H = None
        self.p: B = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.u: J = None
        self.s: F = None
        self.p: F = None
        self.z: F = None
        self.y: A = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: G = None
        self.w: I = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: E = None
        self.y: H = None
        self.p: B = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.u: J = None
        self.s: F = None
        self.p: F = None
        self.z: F = None
        self.y: A = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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