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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: J = None
        self.t: C = None
        self.s: C = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.s: D = None
        self.w: A = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.y: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: J = None
        self.t: C = None
        self.s: C = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.s: D = None
        self.w: A = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.y: H = None
        self.txt = txt

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

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

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