class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.o: E = None
        self.w: B = None
        self.p: I = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: A = None
        self.t: D = None
        self.p: H = None
        self.s: F = None
        self.v: D = None
        self.u: A = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

g.u = f
g.v = a
g.o = e
g.w = c
g.p = h
g.q = j
c.r = j
c.o = b
a.r = h
a.v = h
a.o = c
a.y = g
a.q = e
a.u = b
a.x = f
a.p = f
b.w = e
b.q = e
b.x = d
e.o = b
e.r = g
e.z = d
e.w = a
e.v = a
e.s = a
e.t = j
j.x = a
j.s = a
j.t = a
j.z = f
j.u = g
j.r = c
j.p = c
d.w = h
d.z = g
d.u = g
d.t = b
d.v = b
d.y = b
d.p = f
d.s = j
d.r = j
f.y = g
h.o = c
h.r = c
h.t = f
h.w = f
assert a.o.r.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.o: E = None
        self.w: B = None
        self.p: I = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: A = None
        self.t: D = None
        self.p: H = None
        self.s: F = None
        self.v: D = None
        self.u: A = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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