class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.p: C = None
        self.s: G = None
        self.u: E = None
        self.y: C = None
        self.w: F = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: H = None
        self.x: H = None
        self.q: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.y: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: I = None
        self.z: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: H = None
        self.x: H = None
        self.q: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.y: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: I = None
        self.z: D = None
        self.txt = txt

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

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

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