class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: G = None
        self.w: D = None
        self.o: A = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.r: I = None
        self.x: F = None
        self.p: B = None
        self.o: F = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.s: A = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.r: I = None
        self.x: F = None
        self.p: B = None
        self.o: F = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.s: A = None
        self.z: E = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

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