class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: E = None
        self.o: B = None
        self.u: C = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.s: D = None
        self.p: F = None
        self.u: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.s: D = None
        self.p: F = None
        self.u: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

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