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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.y: A = None
        self.o: I = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: I = None
        self.o: E = None
        self.v: D = None
        self.x: C = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.y: A = None
        self.o: I = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: I = None
        self.o: E = None
        self.v: D = None
        self.x: C = None
        self.y: I = None
        self.t: F = None
        self.txt = txt

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

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