class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: G = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.p: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.p: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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