class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.x: C = None
        self.s: H = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.y: G = None
        self.t: B = None
        self.o: B = None
        self.u: D = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

h.p = g
h.z = k
h.s = k
d.v = g
d.x = c
d.t = a
l.v = g
l.y = a
c.x = l
c.z = h
c.p = h
c.u = d
g.u = d
g.r = d
g.p = d
j.x = b
j.z = b
j.w = b
j.v = h
j.p = c
j.r = d
j.u = d
k.v = h
k.o = l
k.x = l
k.s = a
k.q = a
a.y = j
a.q = k
a.x = h
b.x = j
b.v = j
b.r = d
b.t = d
b.o = d
b.y = k
b.u = c
b.q = c
assert c.u.t.q.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.x: C = None
        self.s: H = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: B = None
        self.y: G = None
        self.t: B = None
        self.o: B = None
        self.u: D = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

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