class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: J = None
        self.y: C = None
        self.r: C = None
        self.o: D = None
        self.q: C = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.w: E = None
        self.v: F = None
        self.z: G = None
        self.p: J = None
        self.u: E = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: B = None
        self.w: B = None
        self.r: H = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: G = None
        self.x: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.w: E = None
        self.v: F = None
        self.z: G = None
        self.p: J = None
        self.u: E = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: B = None
        self.w: B = None
        self.r: H = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: G = None
        self.x: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.txt = txt

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

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