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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: J = None
        self.x: H = None
        self.u: G = None
        self.s: G = None
        self.o: B = None
        self.r: J = None
        self.t: H = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.z: I = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: J = None
        self.u: I = None
        self.x: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: J = None
        self.x: H = None
        self.u: G = None
        self.s: G = None
        self.o: B = None
        self.r: J = None
        self.t: H = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.z: I = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: J = None
        self.u: I = None
        self.x: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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