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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: H = None
        self.r: C = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.r: E = None
        self.o: B = None
        self.y: B = None
        self.t: H = None
        self.z: H = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: H = None
        self.r: C = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.r: E = None
        self.o: B = None
        self.y: B = None
        self.t: H = None
        self.z: H = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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