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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.q: A = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: I = None
        self.v: A = None
        self.r: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.q: A = None
        self.r: H = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: I = None
        self.v: A = None
        self.r: F = None
        self.q: A = None
        self.txt = txt

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

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

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