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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: J = None
        self.r: A = None
        self.y: H = None
        self.s: B = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: J = None
        self.r: A = None
        self.y: H = None
        self.s: B = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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