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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: C = None
        self.u: G = None
        self.t: E = None
        self.o: B = None
        self.z: H = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: C = None
        self.u: G = None
        self.t: E = None
        self.o: B = None
        self.z: H = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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