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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.v: E = None
        self.s: A = None
        self.p: E = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.t: I = None
        self.z: G = None
        self.y: I = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.v: H = None
        self.s: G = None
        self.w: G = None
        self.t: E = None
        self.u: E = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.s: B = None
        self.x: D = None
        self.t: B = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: H = None
        self.v: E = None
        self.s: A = None
        self.p: E = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.t: I = None
        self.z: G = None
        self.y: I = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.v: H = None
        self.s: G = None
        self.w: G = None
        self.t: E = None
        self.u: E = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: G = None
        self.s: B = None
        self.x: D = None
        self.t: B = None
        self.r: E = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

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

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