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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: F = None
        self.t: A = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.x: F = None
        self.t: C = None
        self.y: C = None
        self.z: E = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.o: D = None
        self.p: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: F = None
        self.t: A = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.x: F = None
        self.t: C = None
        self.y: C = None
        self.z: E = None
        self.s: C = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.o: D = None
        self.p: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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