class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.q: H = None
        self.t: H = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.u: B = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.q: H = None
        self.t: H = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: H = None
        self.u: B = None
        self.z: B = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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