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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: G = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: G = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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