class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: I = None
        self.t: J = None
        self.z: F = None
        self.s: E = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.w: C = None
        self.v: F = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.w: C = None
        self.v: F = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

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

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

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