class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.r: I = None
        self.y: E = None
        self.t: C = None
        self.w: D = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: D = None
        self.p: A = None
        self.v: G = None
        self.o: G = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: D = None
        self.p: A = None
        self.v: G = None
        self.o: G = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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