class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.y: I = None
        self.u: D = None
        self.o: C = None
        self.w: B = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: I = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: I = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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