class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.x: G = None
        self.o: G = None
        self.r: E = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: B = None
        self.u: H = None
        self.p: I = None
        self.s: H = None
        self.o: C = None
        self.w: C = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.o: A = None
        self.u: I = None
        self.p: D = None
        self.r: F = None
        self.x: B = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: B = None
        self.u: H = None
        self.p: I = None
        self.s: H = None
        self.o: C = None
        self.w: C = None
        self.v: C = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.o: A = None
        self.u: I = None
        self.p: D = None
        self.r: F = None
        self.x: B = None
        self.q: F = None
        self.txt = txt

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

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

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

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