class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: A = None
        self.t: D = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.u: I = None
        self.y: F = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: H = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.t: D = None
        self.q: I = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: F = None
        self.t: G = None
        self.w: G = None
        self.u: D = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.u: I = None
        self.y: F = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: H = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.t: D = None
        self.q: I = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: F = None
        self.t: G = None
        self.w: G = None
        self.u: D = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

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

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

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