class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: I = None
        self.q: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: G = None
        self.p: F = None
        self.w: B = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: I = None
        self.t: E = None
        self.w: H = None
        self.q: H = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: G = None
        self.p: F = None
        self.w: B = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: I = None
        self.t: E = None
        self.w: H = None
        self.q: H = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: A = None
        self.txt = txt

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

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