class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: D = None
        self.t: I = None
        self.y: G = None
        self.r: E = None
        self.p: F = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.u: F = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.u: I = None
        self.z: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.w: A = None
        self.o: A = None
        self.q: G = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.u: F = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.u: I = None
        self.z: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.w: A = None
        self.o: A = None
        self.q: G = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

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

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