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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.r: D = None
        self.y: G = None
        self.o: C = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: I = None
        self.z: D = None
        self.t: E = None
        self.o: C = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.r: D = None
        self.y: G = None
        self.o: C = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: I = None
        self.z: D = None
        self.t: E = None
        self.o: C = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.q: E = None
        self.txt = txt

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

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

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