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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.p: J = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: I = None
        self.w: J = None
        self.v: A = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: J = None
        self.q: D = None
        self.v: I = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.p: D = None
        self.q: A = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: A = None
        self.s: I = None
        self.p: D = None
        self.w: D = None
        self.t: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.p: J = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: I = None
        self.w: J = None
        self.v: A = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: J = None
        self.q: D = None
        self.v: I = None
        self.x: E = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.p: D = None
        self.q: A = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: A = None
        self.s: I = None
        self.p: D = None
        self.w: D = None
        self.t: B = None
        self.r: D = None
        self.txt = txt

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

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