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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.r: A = None
        self.p: I = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.y: D = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.s: E = None
        self.x: C = None
        self.u: E = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.r: A = None
        self.p: I = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.y: D = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.s: E = None
        self.x: C = None
        self.u: E = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

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