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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.s: A = None
        self.q: A = None
        self.v: F = None
        self.y: D = None
        self.u: G = None
        self.z: G = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.r: F = None
        self.x: D = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.s: A = None
        self.q: A = None
        self.v: F = None
        self.y: D = None
        self.u: G = None
        self.z: G = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.r: F = None
        self.x: D = None
        self.y: C = None
        self.txt = txt

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

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