class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.y: H = None
        self.t: I = None
        self.q: H = None
        self.x: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.z: I = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: H = None
        self.o: G = None
        self.t: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.z: I = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: H = None
        self.o: G = None
        self.t: C = None
        self.r: B = None
        self.txt = txt

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

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