class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.p: G = None
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: I = None
        self.u: F = None
        self.o: F = None
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: I = None
        self.u: F = None
        self.o: F = None
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

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